package Rectangle;

public class rectangleTest {
    public static void main(String[] args) {
        // 创建长度为3的Rectangle数组
        rectangle[] rectangles = new rectangle[3];

        // 给3个矩形对象赋值
        rectangles[0] = new rectangle(10, 5);
        rectangles[1] = new rectangle(20, 15);
        rectangles[2] = new rectangle(30, 25);

        // 遍历输出矩形对象的详细信息
        for (rectangle rectangle : rectangles) {
            System.out.println(rectangle.getinfo());
        }
    }
}

